The present invention relates to a music score recognizing method and a computer-readable recording medium storing a music score: recognizing program,
When inputting an image using a scanner or the like for recognizing a character or sign included therein, an adjustment of inclination of the original which seriously affects the recognition rate, as well as an adjustment of resolution of the image to be inputted are carried out. Further, when inputting an two-valued image, it is necessary to set a two-valuing threshold so as to judge the two-valued image.
It is relatively easy to realize the optimum states with respect to the inclination of the original and the input resolution. However, with respect to the two-valuing threshold, since it depends on the recognition algorithm, it is difficult to set an optimum value when the recognition algorithm is not known. Further, depending on the display resolution, it is often impossible to fully check the two-valued state with the eye.
Thus, it often occurs that the recognition performance can not be fully derived due to impropriety of a two-valuing threshold which is manually set.
Further, when it is found after performing the recognition that a cause of the low recognition rate is the two-valuing threshold, if the recognition is performed again from inputting of the image, there is raised a problem that the number of processing steps eventually increases to take much time for the processing.
The present invention has been made in view of the foregoing problems of the prior art and provides a structure which can automatically set an image two-valuing threshold, which seriously affects the recognition rate, to an optimum value for the recognition.
Therefore, a structure of claim 1 is basically characterized in that in a music score recognizing method of reading a music score image and recognizing music signs therein to prepare data for playing and/or music score displaying, a two-valuing threshold is set using music score information so as to input the music score image as a two-valued image.
A structure of claim 4 provides the foregoing procedure as a recording medium. The concrete structure thereof is basically characterized in that in a computer-readable recording medium storing a music score recognizing program for reading a music score image and recognizing music signs therein to prepare data for playing and/or music score displaying, the music score recognizing program allows execution of an information reading step of reading music score information, a threshold setting step of setting a two-valuing threshold based on the read music score information, and a two-valued image inputting step of inputting the music score image as a two-valued image based on the set two-valuing threshold.
In these structures, the setting of the two-valuing threshold is performed based on the music score information. Accordingly, the setting by an operator based on trial and error is not required, and an optimum threshold can be automatically set and recognition is carried out. This can also improve the whole recognition rate. In the case, it is preferable that as shown in FIG. 1, a staff interval H and a line width t of the staff are derived as music score information and a threshold which renders optimum the ratio therebetween is detected. The reason for this will be explained hereinbelow. When a two-valuing threshold changes, darkness of a two-valued image changes so that thickness of a line changes. Thus, depending on the two-valuing threshold, a line width of the staff of a music score image changes. Various music scores are inputted as images with gradations which are then two-valued using various thresholds. When a value obtained by normalizing a line width of the staff by a staff interval (a ratio of the line width of the staff relative to the staff interval) takes an approximately constant value with respect to the two-valued images which achieve the highest recognition rates, if a two-valuing threshold is set to achieve as close such a value as possible, the two-valued music score image can be produced with an adequate recognition rate. When the ratio of the line width of the staff relates to the staff interval at the optimum threshold changes depending on the resolution or the like (a case wherein when the resolution is low, the recognition rate increases as the ratio of the line width of the staff relative to the staff interval increases, while when the resolution is high, it is reversed), a target value may be changed through a linear function, a table conversion or the like relative to the staff interval.
Further, when a line width or an interval of the staff differs per paragraph or per part, an adequate threshold can not be set only by deriving the staff interval and the line width of the staff. Thus, in a structure of claim 2. the image is divided Into a plurality of blocks (for example, divided per paragraph, per part, per staff and further in a transverse direction), and a two-valuing threshold is set per block using music score information so as to input the music score image as a two-valued image.
Similarly, a structure of claim 5 provides the foregoing procedure as a computer-readable recording medium storing a music score recognizing program. The concrete structure thereof is such that the recording medium includes the music score recognizing program which allows execution of an image reading step of reading the image, an image dividing step of dividing the read image into a plurality of blocks, an information reading step of reading music score information per block, a threshold setting step of setting a two-valuing threshold per block based on the read music score information, and a two-valued image inputting step of inputting the music score image as a two-valued image based on the two-valuing threshold set per block. Also in this structure, it is needless to say that the staff interval and the line width of the staff are appropriate as the foregoing music score information.